<template>
	
	<form @submit="submit" :data-action="`/api/sysetemParams/save?stationId=${param.id}`">
			
			<view class="fixAuto bb middle">
				<view class="w100">
					速度场系数
				</view>
				<view>
					<input type="text" name="x.velocityFieldCoefficient|速度场系数|0~200"   v-model="data.velocityFieldCoefficient" :disabled="disabled" placeholder="请输入速度场系数">
				</view>
			</view>
			<view class="fixAuto bb middle">
				<view class="w100 pr0">
					皮托管系数K值
				</view>
				<view class="pl5">
					<input type="text" name="x.kValue|皮托管系数K值|0~200"   v-model="data.kValue" :disabled="disabled" placeholder="请输入皮托管系数K值">
				</view>
			</view>
			<view class="fixAuto bb middle">
				<view class="w100">
					过量空气系数
				</view>
				<view>
					<input type="text" name="x.lambda|过量空气系数|0~200"   v-model="data.lambda" :disabled="disabled" placeholder="请输入过量空气系数">
				</view>
			</view>
			
			<view class="plr100 pd30" v-if="!disabled">
				<button form-type="submit" class="btn block rds23">
					保存记录
				</button>
			</view>
		</form>

	</layout>
</template>

<script>
	export default {
		data() {
			return {
				param:{id:""} ,
				data : {} ,
				disabled : true 
			}
		},
		onLoad(params) {
			this.param = params ;
			var role = uni.getStorageSync("role");
			this.disabled = role != 2 ;
			this.loadData();
		},
		methods: {
			
			loadData:function(e){
				var data = {id:this.param.id} ;
				this.kit.get("/api/sysetemParams/info",data,res => {
					this.data = res.data || {};
				});
			},
			
			submit:function(e){
				this.form.submit(e , this.success);
			},
			
			success:function(e){
				this.kit.goSuccessBack("保存成功");
			}
		}
	}
</script>
<style>
	page{
		background-color: #fff;
	}
</style>